<script>
import axios from "axios";

export default {
  name: "userManage",
  data(){
    return {
       userList:[]
    }
  },
  methods:{
    riksName(risklevel){
      if(risklevel==0){
        return "安全"
      }
    }
  },
  mounted() {
    axios.get("http://localhost:8080/getAllUser",{
      headers:{
        Authorization: localStorage.getItem("rootToken")
      }
    }).then((res)=>{
      console.log(res)
      this.userList = res.data.data
    })
  }
}
</script>

<template>
<el-card class="h-screen">
  <template #header>用户列表管理</template>
<div v-for="items in userList">用户姓名:{{items.userRealName}}<br>
  风险等级:{{riksName(items.riskLevel)}}
<hr>
</div>
</el-card>
</template>

<style scoped>

</style>